#include <stdio.h>
#include <stdlib.h>

unsigned sum_of_factors(unsigned n){
int count=1;
int i=0;
for(i=2;i<n;i++){
    if(n%i==0){
        count+=i;
    }
}
return count;
}